package com.guigu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.pojo.DeliveryAddress;
import com.guigu.pojo.Users;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface UsersService extends IService<Users> {

    //注册
    Map register(Users users);

    //用户名重复判断
    Map queryRepetition(Users users);

    //手机邮箱重复判断
    Map queryRepetition02(Users users);

    //登录
    Users login(Users users);

    //申请成为商户
    Map apply_for_commercial(Users users);

    //申请成为供应商
    Map apply_for_supplier(Users user,Integer[] supplierGoodsCategoryIds,MultipartFile img, HttpServletRequest request);

    Map audit_for_commercial(Users user);

    Map audit_for_supplier(Users user);

    Page<Users> queryAllUser(Users users, Integer pageno, Integer pagesize);

    Users queryUserById(Integer id);

    Map updateSupplier(Integer id,String uname,Integer[] ids,MultipartFile img,HttpServletRequest request);

    //获取所有的商户或者供应商
    Page<Users> queryUsersByTypeId(Users user,Integer pageno,Integer pagesize);

    //修改用户密码
    Map editUsersbyPwd(Users users);

    //修改用户状态
    Map eideUserbyaccountState(Users users);

    //根据id查询用户
    Users usersbyid(Integer id);

    //修改用户
    Map editusers(Users users,MultipartFile img,HttpServletRequest request);

    Map editcomm(Users users);

    //绑定手机
    Map userphonebinding(Users users);

    //添加
    Map addusers(Users users,MultipartFile img,HttpServletRequest request);

    Map updateBYisCloseUpShop(Users users);
}
